package com.Jiang.service;

import com.Jiang.dao.Order.OrderMapper;
import com.Jiang.dao.OrderItem.OrderItemMapper;
import com.Jiang.pojo.OrderItem;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("OrderItemServiceImpl")
public class OrderItemServiceImpl implements OrderItemService{

    @Autowired
    OrderItemMapper orderItemMapper;
    @Override
    public int addItem(Map map) {
        return orderItemMapper.addItem(map) ;
    }

    @Override
    public List<OrderItem> queryAllOrderItems(Map map) {
        return orderItemMapper.queryAllOrderItems(map);
    }

    @Override
    public List<OrderItem> selectItemsByOrderId(int orderId) {
        return orderItemMapper.selectItemsByOrderId(orderId);
    }
}
